<ion-content padding>
  <div class="text-center logo mb-30">
    <div class="font70">JLB</div>
    <P class="mt0">欢迎，请登录</P>
  </div>
  <form [formGroup]="validateForm" (submit)="login($event)">
    <ion-list class="mb">

      <ion-item>
        <ion-label fixed for="account">
          <ion-icon name="md-person"></ion-icon>
        </ion-label>
        <ion-input type="text" id="account" formControlName="account" placeholder="请输入账号"></ion-input>
      </ion-item>
      <div class="error-message" *ngIf="getFormControl('account').dirty&&getFormControl('account').hasError('required')">请输入账号</div>

      <ion-item>
        <ion-label fixed for="password">
          <ion-icon name="md-unlock"></ion-icon>
        </ion-label>
        <ion-input type="password" id="password" formControlName="password" placeholder="请输入密码"></ion-input>
      </ion-item>
      <div class="error-message" *ngIf="getFormControl('password').dirty&&getFormControl('password').errors">
        <ng-container *ngIf="getFormControl('password').hasError('required')">请输入密码</ng-container>
        <ng-container *ngIf="getFormControl('password').hasError('minlength')">密码不小于6位</ng-container>
      </div>

    </ion-list>

    <ion-grid>
      <ion-row>
        <ion-col col-4>
          <button ion-button color="primary" type="button" block outline [navPush]="'RegisterPage'">注册</button>
        </ion-col>
        <ion-col col-8>
          <button ion-button color="primary" type="submit" block>登录</button>
        </ion-col>
      </ion-row>
      <ion-row>
      </ion-row>
    </ion-grid>
  </form>
</ion-content>
